This invention relates to telephone systems and more particularly to a method of handling telephone calls by screening the origin and/or destination telephone number and logging, rerouting, forwarding, distinctive-ringing and/or answering the calls based upon prescribed screening criteria.
Prior art screening methods focus on prefix telephone number tokens such as 0, 1, 9, 10-10 or area codes and exchanges and route or reject calls based on the first one or more recognized tokens. Routing or rejection of such broad categories of calls typically occurs in real time response to dialing by the call originator. Examples would include routing of a call with a 9 prefix followed by seven numbered tokens from an internal line where the call originator must first dial a 9 to get an outside line and rejection of any call with a 1-900 prefix on long distance-restricted lines.
A so-called dial plan mapper has been proposed in which missing tokens automatically may be pre-appended (xe2x80x98pre-pendedxe2x80x99) when the mapper recognizes that a call originator has omitted a needed token. For example, a 9 may be pre-pended to seven numbered tokens dialed in error by a call originator who forgets to xe2x80x98dial out.xe2x80x99 The proposed mapper may also reject a call when the mapper detects a prefix token sequence, e.g. 1-976, that represents an unauthorized use of a telephone line. Such a dial plan mapper is described in co-pending U.S. patent application Ser. No. 09/219,182 entitled DIAL PLAN MAPPER filed Dec. 22, 1998 and assigned in common with the present application to Cisco Technology, Inc. The disclosure of the DIAL PLAN MAPPER patent application is incorporated herein by this reference.
The dial plan mapper uses what is referred to as a regular expression, longest dial string match criterion and acts immediately when the longest string match is made. While the dial plan mapper technique is quick, it lacks specificity and thus does not comprehend rejecting, for example, a particular 1-800 number while routing, or call-completing, another. This is because the dial plan mapper attempts to find a match as each token is received and upon a longest dial string match, effectively stops monitoring the line for further token entries. The reject-upon-a-match technique can confuse auto-dialers and other special-purpose telephone equipment, which may expect an entire string of tokens to be acknowledged by the PSTN.
The dial plan mapper technique requires storage of every possible match dial string, although trailing tokens representing a four digit extension may be treated by the match string logic as don""t cares. Thus, every explicit match target must be represented by a stored match pattern unless the match dial string is a prefix such as 0, 8 or 9 or a leading token string such as an area code or exchange. Enumerating each and every desired match requires a lot of memory to store the match patterns. Prefix-based screening lacks specificity, since specifying a 1-800 prefix match pattern will result in all 1-800 calls being filtered or blocked, for example, when it may be desired to filter or block only particular 1-800 calls. Postfix-based screening is impossible using the dial plan mapper technique.
An electronic method and apparatus for handling telephone calls is described. The method includes storing in a memory a telephone number template. The template preferably is as wide as a telephone number is long and identifies one or more telephone number digits by the digit positions within a telephone number field for comparison purposes. The method further includes monitoring a telephone line for a call placed thereon, identifying at least one of the origin and the destination telephone number and storing one or more digits of such identified telephone number in a memory. The method further includes comparing the stored digits of the identified telephone number with the corresponding digits of the stored template. Finally, the method includes processing the call based upon the result of said comparing. Such processing may include any one or more of logging, filtering, blocking, ignoring, rerouting, forwarding, distinctive-ringing and answering the call. In accordance with one aspect of the invention, the template includes a first-level mask-identifying digit position criterion that identifies dialing tokens of interest and a second-level target-identifying digit content criterion that attempts to pattern match those tokens of interest with corresponding tokens of stored telephone numbers.